package javacommon.tag.components;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.ListUIBean;
import org.apache.struts2.views.annotations.StrutsTag;
import org.apache.struts2.views.annotations.StrutsTagAttribute;

import com.opensymphony.xwork2.util.ValueStack;

@StrutsTag(name="myradio", tldTagClass="javacommon.tag.views.MyRadioTag", description="Renders a radio button input field")
public class MyRadio extends ListUIBean {
	final public static String TEMPLATE = "myradio";
	protected String sql;
    protected String condition;
    protected String isSql;

    public MyRadio(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
        super(stack, request, response);
    }

    protected String getDefaultTemplate() {
        return TEMPLATE;
    }
    
    @StrutsTagAttribute(description="set condition", type="String")
    public void setCondition(String condition) {
		this.condition = condition;
	}
    
    @StrutsTagAttribute(description="set sql", type="String")
    public void setSql(String sql) {
        this.sql = sql;
    }
    
    @StrutsTagAttribute(description="set isSql", type="String")
    public void setIsSql(String isSql) {
        this.isSql = isSql;
    }
}
